package com.sky.utils;

public class ThreadLocalUtil {
    private static final ThreadLocal threadLocal = new ThreadLocal<>();
    // 根据键获取值
    public static<T> T get(){
        return (T) threadLocal.get();
    }

    // 存储键值对
    public static void set(Object value){
        threadLocal.set(value);
    }

    // 清除键值对
    public static void remove(){
        threadLocal.remove();
    }

}
